<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>子代选择器</title>
    <style>
        /* 再带选择器只会选择定子类 */
        div>a{
            color: red;
        }

    </style>
</head>
<body>
    <div>
        父类
        <a href="#"></a>
        <p>
            <a href="#">这是在子代p标签中的a标签</a>
        </p>
    </div>
    
</body>
</html>